<?php
	// create new database using the OOP approach
	$db=new SQLite("db.sqlite");
	// create table 'USERS' and insert sample data

	$db->query("BEGIN;
				CREATE TABLE users (id INTEGER(4) UNSIGNED PRIMARY KEY,name CHAR(255), email CHAR(255));

				INSERT INTO users (id,name,email) VALUES (NULL,'administrator','password');

				COMMIT;");
	// fetch rows from the 'USERS' database table
	$result=$db->query("SELECT * FROM users");
	// loop over rows of database table
	while($result->valid()) {
		// fetch current row
		$row=$result->current();
		print_r($row);
		// move pointer to next row
		$result->next();
	}
?>